<template>
  <div>
    <h1>{{msg}}</h1>
    <hr>
    <h3>{{$store.state.a.count}}</h3>
    <div>
      <button @click="addAction">+</button>
      <button @click="reduceAction">-</button>
    </div>
  </div>
</template>
<script>
  import store from '@/vuex/store'
  import {maState,mapMutations,mapGetters,mapActions} from 'vuex'
  export default {
    data(){
      return {
        msg:'hello vuex',
      }
    },
    store,
    comptuted:{
      ...mapGetters(["count"])

    },
    methods:{
      ...mapMutations([
        'add','reduce'
      ]),
      ...mapActions(['addAction','reduceAction'])
    },


  }
</script>
